﻿using System;
using System.Html.DOM;

using RexToy.UI.Controls;

namespace RexToy.UI
{
    [NonScript]
    public class _Window : Control
    {
        public override Size GetSize()
        {
            return new Size(0, 0);
        }

        public Size GetScrollSize()
        {
            return new Size(0, 0);
        }

        public DomNode GetDocumentBody()
        {
            return null;
        }
    }

    [NonScript]
    public class _Document : DomNode
    {
        private _Document(HtmlElement element)
            : base(element)
        {
        }

        public Point GetScrollPosition()
        {
            return new Point(0, 0);
        }
    }

    [ImportClass("RexToy.UI", string.Empty)]
    public class Global
    {
        /// <summary>
        /// have event [onready, onresize]
        /// </summary>
        [ImportMember("Window")]
        public static readonly _Window Window;

        [ImportMember("Document")]
        public static readonly _Document Document;

        [ImportMember("$")]
        public static DomNode Query(string selector)
        {
            return null;
        }

        [ImportMember("$$")]
        public static DomNode[] QueryAll(string selector)
        {
            return null;
        }
    }
}
